HTML
<!-- button -->
<div class="navbar navbar-inverse">
<button class="btn btn-sm btn-default form-cancel mr-10" data-dismiss="modal">
    <i class="fa fa-remove"></i> Thoát
</button>
<button class="btn btn-sm btn-fill btn-primary m-r-5 btn-submit" type="button" 
        data-loading-text="<i class='icon-spinner4 fa-spin'></i> Đang xử lý ...">
    <i class="fa fa-save"></i> Lưu lại
</button>
<!-- /button -->
Ultra form

JS example


    /* JS highlight */
    $(f).ultraForm({
        uiType: 1,
        action: '/recruitment/candidateEdit',
        actionType: 'ajax',
        props: [
            {
                name: 'Id',
                type: 'hidden'
            },
            {
                name: 'Name',
                type: 'text'
            }, {
                name: 'TongDiem',
                type: 'number',
                option: {
                    decimals: 1,
                    step: 0.1
                }
            },
            {
                name: 'Ngay',
                type: 'datepicker',
                option: {
                    singleDatePicker: true,
                    autoUpdateInput: true,
                    timePicker: true,
                    timePicker24Hour: true,
                    locale: {
                        format: 'DD/MM/YYYY HH:mm'
                    }
                },
                required: {
                    message: 'Vui lòng nhập ngày'
                }
            },
            {
                name: 'Email',
                type: 'email'
            },
            {
                name: 'TinhTrangHonNhan',
                type: 'select2',
                option: {}
            },
            {
                type: 'text',
                attribute: 'JobPositionId',
                render: function (row) {
                    if (row.ObjJobPosition != null)
                        return '' + row.ObjJobPosition.Name + '';
                    return '';
                },
                filter: {
                    type: 'option',
                    ajax: {
                        url: '/category/jobpositionlist',
                        data: {
                            unlimited: true,
                            cache: true
                        },
                        attr: {
                            id: 'Id',
                            text: 'Name'
                        }
                    }
                }
            },
            {
                name: 'GiamSat',
                type: 'select2',
                option: {
                    initSelection: function (element, callback) {
                        if (quanly != null) {
                            $(element).select2('data', { id: quanly.Id, text: quanly.FullName }).trigger('change');
                        }
                    },
                    ajax: {
                        url: '/employee/suggestions',
                        dataType: 'json',
                        delay: 150,
                        data: function (term, page) {
                            return {
                                keyword: term,
                                limit: 10
                            };
                        },
                        processResults: function (result, params) {
                            var data = [];
                            $.each(result,
                                function () {
                                    data.push({
                                        id: this.Id,
                                        text: this.FullName
                                    });
                                });
                            return {
                                results: data
                            };
                        }
                    },
                    escapeMarkup: function (markup) { return markup; },
                    minimumInputLength: 1,
                    allowClear: true,
                    placeholder: "Chọn quản lý"
                }
            }
        ],
        autoSubmit: false,
        validCallback: function (data, btn) {
            data = app.formDataToJson(data);
            console.log(data);
        },
        afterSubmit: function (form) {
            if (callback != null) {
                callback();
            }
        }
    });